import * as React from "react";
import * as ReactDOM from "react-dom";

import "./Tabbar.less";


export interface TabbarProps {
    show?: string
}

export interface State {

}

export default class Tabbar extends React.Component<TabbarProps, State> {
    //默认属性
    static readonly defaultProps: TabbarProps = {
        show: ''
    };

    constructor(props: TabbarProps) {
        super(props);
        //默认状态
        this.state = {};
    }

    //组件挂载后回调
    componentDidMount() {
        document.title = "";

    }

    render() {
        return <div className="Tabbar">
            <div className="weui-tab">
                <div className="weui-tabbar">
                    <a href="#/subordinate" className={`weui-tabbar__item
                       ${this.props.show === 'subordinate' ? 'weui-bar__item_on' : ''}`}>
                        <i className="iconfont icon-dingdan weui-tabbar__icon"/>
                        <p className="weui-tabbar__label">首页</p>
                    </a>
                    <a href="#/shop" className={`weui-tabbar__item
                       ${this.props.show === 'shop' ? 'weui-bar__item_on' : ''}`}>
                        <i className="iconfont icon-zhanghao weui-tabbar__icon"/>
                        <p className="weui-tabbar__label">我</p>
                    </a>
                    {/*<a href="#/user" className={`weui-tabbar__item*/}
                    {/*${this.props.show === 'user' ? 'weui-bar__item_on' : ''}`}>*/}
                    {/*<i className="iconfont icon-touxiang weui-tabbar__icon"/>*/}
                    {/*<p className="weui-tabbar__label">个人中心</p>*/}
                    {/*</a>*/}
                </div>
            </div>
        </div>
    }
}
